<template>
    <div class="container">
        <van-form @submit="onSubmit">
          <van-cell-group inset>
            <van-field
              v-model="form.realName"
              name="name"
              label="姓名"
              placeholder="姓名"
              :rules="[{ required: true, message: '请填写姓名' }]"
            />
            <van-field
              v-model="form.mobilePhone"
              type="number"
              name="phoneNumber"
              label="手机号"
              placeholder="手机号"
              :rules="[{ required: true, message: '请填写手机号' }]"
            />
            <!-- <van-field
              v-model="form.address"
              name="地址"
              label="地址"
              placeholder="地址"
              :rules="[{ required: true, message: '请填写地址' }]"
            /> -->
          </van-cell-group>
        </van-form>

    </div>
</template>
 
<script setup>
import { ref } from 'vue';
import { reactive } from 'vue';
import { useRouter } from 'vue-router';
import { onMounted } from 'vue'
import { wxlogin } from '@/api/login';
import { showToast } from 'vant';

const { mobilePhone, realName } = JSON.parse(localStorage.getItem('userInfo'))[0];

const router = useRouter()
const form = reactive({
  mobilePhone: mobilePhone,
  realName: realName,
})



onMounted(() => {
})







</script>
 

<style lang="scss" scoped>
.container {
  background: #fff;
  overflow: hidden;
  margin-bottom: 45px;
  height: 100%;
}
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #fff;
}
.addbtn{
  position: fixed;
  bottom: 1rem;
  width: 92%;
  left: 4%;
}
.van-form{
  background: #fff;
}


</style>